class AceCameraFP extends GameCameraBase;

var float CameraOffset;

function OnBecomeActive( GameCameraBase OldCamera )
{
	super.OnBecomeActive( OldCamera );

	`log( Name @ "Become active" );
}

function OnBecomeInActive( GameCameraBase OldCamera )
{
	super.OnBecomeInActive( OldCamera );

	`log( Name @ "Become inactive" );
}

simulated function UpdateCamera( Pawn P, GamePlayerCamera CameraActor, float DeltaTime, out TViewTarget OutVT )
{
	local Vector facingX;
	local Vector facingY;
	local Vector facingZ;
	local CameraActor camera_actor;

	camera_actor = CameraActor( OutVT.Target );

	if ( camera_actor != None )
	{
		OutVT.POV.FOV = camera_actor.FOVAngle;
		OutVT.POV.Location = camera_actor.Location;
		OutVT.POV.Rotation = camera_actor.Rotation;
	}
	else
	{
		if( P != none )
		{
			OutVT.POV.FOV = CameraActor.DefaultFOV;
			
			
			GetAxes(P.Rotation, facingX, facingY, facingZ);
			OutVt.POV.Location = P.Location + (CameraOffset * facingX);
			OutVt.POV.Rotation = P.Rotation;
		}
	}
}

DefaultProperties
{
	CameraOffset = 10.0f;
}
